package name.rainman.examples.osgi.firstbundle.internal;

public class MyThread extends Thread {
	private volatile boolean active = true ;
	
	public void run() {
		while( active ) {
			System.out.println( "Hello OSGI Console") ;
			try {
				Thread.sleep(5000) ;				
			} catch ( Exception ex ) {
				System.out.println( "Thread interrupted " + ex.getMessage() ) ;
				ex.printStackTrace() ;
			}
		}
	}
	
	public void stopThread() {
		active = false ;
	}
}
